home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / currentdir.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  2KB  |  70 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: currentdir.c,v 1.3 1996/08/13 13:52:45 digulla Exp $
  4.     $Log: currentdir.c,v $
  5.     Revision 1.3  1996/08/13 13:52:45  digulla
  6.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  7.     Replaced __AROS_LA by __AROS_LHA
  8.  
  9.     Revision 1.2  1996/08/01 17:40:48  digulla
  10.     Added standard header for all files
  11.  
  12.     Desc:
  13.     Lang: english
  14. */
  15. #include <clib/exec_protos.h>
  16. #include "dos_intern.h"
  17.  
  18. /*****************************************************************************
  19.  
  20.     NAME */
  21.     #include <clib/dos_protos.h>
  22.  
  23.     __AROS_LH1(BPTR, CurrentDir,
  24.  
  25. /*  SYNOPSIS */
  26.     __AROS_LHA(BPTR, lock, D1),
  27.  
  28. /*  LOCATION */
  29.     struct DosLibrary *, DOSBase, 21, Dos)
  30.  
  31. /*  FUNCTION
  32.     Sets a new directory as the current directory. Returns the old one.
  33.     0 is valid in both cases and represents the boot filesystem.
  34.  
  35.     INPUTS
  36.     lock - Lock for the new current directory.
  37.  
  38.     RESULT
  39.     Old current directory.
  40.  
  41.     NOTES
  42.  
  43.     EXAMPLE
  44.  
  45.     BUGS
  46.  
  47.     SEE ALSO
  48.  
  49.     INTERNALS
  50.  
  51.     HISTORY
  52.     29-10-95    digulla automatically created from
  53.                 dos_lib.fd and clib/dos_protos.h
  54.  
  55. *****************************************************************************/
  56. {
  57.     __AROS_FUNC_INIT
  58.     __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
  59.  
  60.     /* Get pointer to process structure */
  61.     struct Process *me=(struct Process *)FindTask(NULL);
  62.     BPTR old;
  63.  
  64.     /* Nothing spectacular */
  65.     old=me->pr_CurrentDir;
  66.     me->pr_CurrentDir=lock;
  67.     return old;
  68.     __AROS_FUNC_EXIT
  69. } /* CurrentDir */
  70.